import { defineStore } from "pinia";
import { GlobalState } from "@/stores/interface";
export const useGlobalStore = defineStore({
  id: "rxx-global",
  state: (): GlobalState => ({
    // 布局模式 (纵向：vertical | 经典：classic | 横向：transverse | 分栏：columns)
    layout: "vertical",
    // 折叠菜单
    isCollapse: false,
    // 面包屑导航
    breadcrumb: true,
    // 面包屑导航图标
    breadcrumbIcon: true
  }),
  getters: {},
  actions: {
    setGlobalState(...args: ObjToKeyValArray<GlobalState>) {
      this.$patch({ [args[0]]: args[1] });
    }
  }
});
